package UIFree.FX.pageturner {
	import UIFree.uif_ecomponent;
	
	public class pt_alphaTurner extends pt_basePageTurner {
		public function pt_alphaTurner(parent:uif_ecomponent, a_transition:Function=null, a_fps:Number=20, a_duration:Number=1500) {
			super(parent, a_transition, a_fps, a_duration);
		}
		
		override protected function startFX(): void {
			addChild(startBitmap);
			addChild(endBitmap);
			endBitmap.alpha = 0;
		}
		
		override protected function endFX(): void {
			removeChild(startBitmap);
			removeChild(endBitmap);
		}
		
		override protected function updateFromState(): void {
			startBitmap.alpha = 1 - state;
			endBitmap.alpha = state;
		}		
	}
}